package com.shopping.mall.core.module.freemarkerMail.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.validation.constraints.NotNull;
import java.sql.Timestamp;

/**
 * FreemarkerMail实体类
 *
 * @author zzy
 * @date 2021-09-27
 */
@Data
@TableName("freemarker_mail")
public class FreemarkerMail {

public interface insert {
}

public interface update {
}

    @ApiModelProperty(value = "id")
    @TableId(type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "template")
    @NotNull(message = "template不能为空" , groups = {insert.class})
    private String template;

    @ApiModelProperty(value = "type")
    @NotNull(message = "type不能为空" , groups = {insert.class})
    private Integer mailType;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createAt;
}
